package com.myproject.sbp.apollo.controller;

import com.myproject.sbp.apollo.conf.TestBean2;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 情况二测试
 * 方式一
 * @author ywh
 */
@RestController
@RefreshScope
public class ApolloController3 {

    @Resource
    private TestBean2 testBean2;

    @ResponseBody
    @GetMapping("/testBean2")
    public Object testBean2(){
        return testBean2.getCommandTimeout();
    }

}